<%-- 
    Document   : Create
    Created on : Nov 23, 2012, 12:10:28 AM
    Author     : Admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <script src="../Theme/NumberAllow.js" type="text/javascript"></script>
        <script src="../Theme/calendar.js" type="text/javascript"></script>      
        <link rel="stylesheet" type="text/css" href="../Theme/calendar.css">

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body onload="init()">
        <%
            out.println("<form action='CreateState.jsp' method='POST'>");
            out.println("<table>");

            out.println("<script type=\"text/javascript\">");
            out.println(" function init() {\n"
                    + "                calendar.set(\"date\");\n"
                    + "                calendar.set(\"dateHappen\");\n"
                    + "                calendar.set(\"dateBegin\");\n"
                    + "                calendar.set(\"dateEnd\");\n"
                    + "            }");
            out.println("</script>");

            out.println("<tr>");
            out.println("<td>Kind</td><td><select name='kind'><option>Income</option><option>Outcome</option></select></td>");
            out.println("</tr>");
            out.println("<tr>");
            out.println("<td>Name</td><td><input type='text' name='name' required/></td>");
            out.println("</tr>");

            out.println("<tr>");
            out.println("<td>Type</td><td><input type='radio' name='type' value='Once' required onclick=\"date.disabled=false,dateBegin.disabled=true,dateEnd.disabled=true\"/>Once</td>");
            out.println("</tr>");

            out.println("<tr>");
            out.println("<td></td><td>Day Occurrence<input type='text' name='date' id='date' required disabled/> </td>");
            out.println("</tr>");

            out.println("<tr>");
            //out.println("<td></td><td><input type='radio' name='type' value='Daily'required onclick=\"dateBegin.disabled=false,dateEnd.disabled=false,dateHappen.disabled=false,date.disabled=true\"/>Weekly</td>");
            out.println("<td></td><td><input type='radio' name='type' value='Daily'required onclick=\"dateBegin.disabled=false,dateEnd.disabled=false,date.disabled=true\"/>Daily</td>");
            out.println("</tr>");

            out.println("<tr>");
            //out.println("<td></td><td>Day Occurrence<input type='text' name='dateHappen' id='dateHappen' required disabled/>Day Begin<input type='text' name='dateBegin' id='dateBegin' required disabled/>Day End<input type='text' name='dateEnd' id='dateEnd' required disabled/></td>");
            out.println("<td></td><td>Day Begin<input type='text' name='dateBegin' id='dateBegin' required disabled/>Day End<input type='text' name='dateEnd' id='dateEnd' required disabled/></td>");
            out.println("</tr>");

            out.println("<tr>");
            out.println("<td>Amount</td><td><input type='text' name='amount' onKeyPress=\"return checkIt(event)\" required/></td>");
            out.println("</tr>");
            out.println("<tr>");
            out.println("<td></td><td><input type='submit' value='Submit'/></td>");
            out.println("</tr>");
            out.println("</table>");
            out.println("</form>");
        %>
    </body>
</html>
